package com.vipshop.core.entity;

import com.vipshop.core.base.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * @author sxzku
 * @version 1.0
 * @className Product
 * @description TODO
 * @date 2019/3/13 1:00
 **/

@Entity
@Table(name = "vip_product")
public class Product  extends BaseEntity {
    /**
     * 分类Id
     */
    @Column(name = "category_id",nullable = false)
    private  Long categoryId;
    /**
     * 商品名称
     */
    @Column(name = "name",nullable = false)
    private  String name;
    /**
     * 商品副标题
     */
    @Column(name = "subtitle")
    private  String subTitle;
    /**
     * 商品图片Id
     */
    @Column(name = "product_image_id")
    private  Long productImageId;
    /**
     * 商品详细
     */
    @Column(name = "detail")
    private  String detail;
    /**
     * 商品价格
     */
    @Column(name = "price")
    private BigDecimal price;
    /**
     * 商品库存
     */
    @Column(name = "stock")
    private Integer stock;
    /**
     * 状态（1：在售 2：下架 3：删除）
     */
    @Column(name = "status")
    private Integer status;

    /**
     * 分类Id
     * @return
     */
    public Long getCategoryId() {
        return categoryId;
    }

    /**
     * 分类Id
     * @param categoryId
     */
    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    /**
     * 商品名称
     * @return
     */
    public String getName() {
        return name;
    }

    /**
     * 商品名称
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 商品副标题
     * @return
     */
    public String getSubTitle() {
        return subTitle;
    }

    /**
     * 商品副标题
     * @param subTitle
     */
    public void setSubTitle(String subTitle) {
        this.subTitle = subTitle;
    }

    /**
     *商品图片Id
     * @return
     */
    public Long getProductImageId() {
        return productImageId;
    }

    /**
     * 商品图片Id
     * @param productImageId
     */
    public void setProductImageId(Long productImageId) {
        this.productImageId = productImageId;
    }

    /**
     * 商品详细
     * @return
     */
    public String getDetail() {
        return detail;
    }

    /**
     * 商品详细
     * @param detail
     */
    public void setDetail(String detail) {
        this.detail = detail;
    }

    /**
     * 商品价格
     * @return
     */
    public BigDecimal getPrice() {
        return price;
    }

    /**
     * 商品价格
     * @param price
     */
    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    /**
     * 商品库存
     * @return
     */
    public Integer getStock() {
        return stock;
    }

    /**
     * 商品库存
     * @param stock
     */
    public void setStock(Integer stock) {
        this.stock = stock;
    }

    /**
     * 商品状态
     * @return
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 商品状态
     * @param status
     */
    public void setStatus(Integer status) {
        this.status = status;
    }
}
